<!-- 拼团列表 -->
<template>
	<view class="group">
		<view class="group-list">
			<view class="group-list-item" v-for="(item,index) in dataList" :key='index' @click="onClick(item.pk_id)">
				<image class="group-list-image" mode='aspectFill' :src="$formatImg(item.logo)"></image>
				<view class="box-group">
					<view class="u-font-26 u-line-1">
						{{item.name}}
					</view>
					<view class="kaituan">
						{{item.number}}人开团
					</view>
					<view class=" u-flex u-row-between">
						<view class="u-flex ">
							<view class="u-m-r-10 u-font-20">
								拼团价
							</view>
							<view class="group-price u-flex">
								<text class="u-m-r-5 u-font-20">￥</text>
								<text class="u-font-36">{{item.price}}</text>
							</view>
						</view>
<!-- 						<view class="return_price">
							返 20
						</view> -->
					</view>
				</view>
			</view>
		</view>
		<sww-load-more :params="dataListParams" @load="loadMore"></sww-load-more>
	</view>
</template>

<script>
	import {
		pagingMixin
	} from "@/mixins/pagingMixin.js"
	import {
		uniLinkTo
	} from '@/utils/uniPromise'
	import { countTime } from '@/utils/moment/index.js'
	export default {
		mixins: [pagingMixin],
		data() {
			return {
				dataList: [], //数据列表
			}
		},
		created(){
			let NewData = new Date().getTime()
			// if()
			// countTime()
		},
		methods: {
			$onLoad: function() {
				this.initPage()
			},
			$onReachBottom: function() {
				this.loadMore()
			},
			// 页面初次渲染
			initPage() {
				this._init_data("GetTeambuyProductList")
			},
			loadMore() {
				this._load_data()
			},
			// 跳转
			onClick(id) {
				uniLinkTo(`/package/product/group/details/index?id=${id}`)
			}
		}
	}
</script>




<style lang='scss' scoped>

	
	.group {
		background-color: #f5f5f5;
		min-height: 100vh;
	}


	.group-list {
		display: flex;
		padding: 20rpx;
		justify-content: space-between;
		flex-wrap: wrap;
	}

	.group-list-item {
		width: calc(50% - 10rpx);
		margin-bottom: 20rpx;
		border-radius: 20rpx;
	}

	.group-list-image {
		width: 100%;
		height: 338rpx;
		border-radius: 20rpx 20rpx 0 0;
	}


	.group-price {
		color: $sww-theme-price;
	}

	.box-group {
		background-color: #ffffff;
		border-radius: 0 0 20rpx 20rpx;
		padding: 20rpx 20rpx;
	}

	.kaituan {
		font-size: 22rpx;
		background: rgba(255, 140, 49, 0.2);
		border-radius: 4rpx;
		padding: 0 10rpx;
		display: inline-block;
		margin: 10rpx 0;
		color: $sww-theme-price;
		border: 1rpx solid $sww-theme-price;
	}

	.return_price {
		position: relative;
		top: -10rpx;
		color: #ffffff;
		font-size: 32rpx;
		width: 100rpx;
		text-align: center;
		line-height: 44rpx;
		height: 44rpx;
		background: $sww-theme-price;
		border-radius: 22px;
	}
</style>
